﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XWord.Fundamental.Domain;
using System.Collections;

namespace XWord.WPF.ApplicationFramework
{
    public class EtymaSearch : BaseSearch
    {
        public IList<EtymaMessage> Source { get; set; }

        public override bool CanQuery()
        {
            return !string.IsNullOrEmpty(SearchObject.ToString());
        }

        public override IEnumerable Query()
        {
            return Source.Where(e => e.Name.StartsWith(SearchObject.ToString())).ToObservableCollection();
        }
    }
}
